
package com.snail.mobile.sim.oss.videoinfo.service.impl;

import java.util.Collection;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;

import com.sungrid.seine.oss.core.system.dao.SysLogDao;
import com.sungrid.seine.oss.core.system.model.SysLog;
import com.sungrid.seine.oss.framework.service.impl.BaseManagerImpl;
import com.snail.mobile.sim.oss.videoinfo.model.TblVideoInfoOss;
import com.snail.mobile.sim.oss.videoinfo.dao.TblVideoInfoOssDao;
import com.snail.mobile.sim.oss.videoinfo.service.TblVideoInfoOssManager;
import com.sungrid.seine.oss.framework.util.Page;
import com.sungrid.seine.oss.framework.util.PageList;
import com.sungrid.seine.oss.framework.util.StringHelper;

public class TblVideoInfoOssManagerImpl extends BaseManagerImpl implements TblVideoInfoOssManager 
{
    private TblVideoInfoOssDao dao;
    private SysLogDao sysLogDao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setTblVideoInfoOssDao(TblVideoInfoOssDao dao) 
    {
        this.dao = dao;
    }

    /**
     * Set the Log Dao for communication with the data layer.
     * 
     * @param dao
     */
    public void setSysLogDao(SysLogDao dao)
    {
        this.sysLogDao = dao;
    }

    /**
     * @see com.snail.mobile.sim.oss.videoinfo.service.TblVideoInfoOssManager#getTblVideoInfoOsss(com.snail.mobile.sim.oss.videoinfo.model.TblVideoInfoOss)
     */
    public List getTblVideoInfoOsss(final TblVideoInfoOss tblVideoInfoOss) 
    {
        return dao.getTblVideoInfoOsss(tblVideoInfoOss);
    }

    /**
     * @see com.snail.mobile.sim.oss.videoinfo.service.TblVideoInfoOssManager#getTblVideoInfoOss(String nid)
     */
    public TblVideoInfoOss getTblVideoInfoOss(final String nid) 
    {
        return dao.getTblVideoInfoOss(new Integer(nid));
    }

    /**
     * @see com.snail.mobile.sim.oss.videoinfo.service.TblVideoInfoOssManager#saveTblVideoInfoOss(TblVideoInfoOss tblVideoInfoOss)
     */
    public void saveTblVideoInfoOss(TblVideoInfoOss tblVideoInfoOss) 
    {
        if (StringHelper.isNotNull(tblVideoInfoOss.getNid()))
        {
            dao.saveOrUpdateTblVideoInfoOss(tblVideoInfoOss);
        }
        else
        {
            dao.saveTblVideoInfoOss(tblVideoInfoOss);
        }
    }

    /**
     * @see com.snail.mobile.sim.oss.videoinfo.service.TblVideoInfoOssManager#removeTblVideoInfoOss(String nid)
     */
    public void removeTblVideoInfoOss(final String nid) 
    {
        dao.removeTblVideoInfoOss(new Integer(nid));
    }

    /**
     * @see com.snail.mobile.sim.oss.videoinfo.service.TblVideoInfoOssDao#removeTblVideoInfoOsss(Collection tblVideoInfoOsss)
     */
    public void removeTblVideoInfoOsss(final Collection tblVideoInfoOsss)
    {
        dao.removeTblVideoInfoOsss(tblVideoInfoOsss);
    }

    /**
     * @see com.snail.mobile.sim.oss.videoinfo.service.TblVideoInfoOssDao#saveTblVideoInfoOsss(Collection tblVideoInfoOsss)
     */
    public void saveTblVideoInfoOsss(final Collection tblVideoInfoOsss)
    {
        dao.saveTblVideoInfoOsss(tblVideoInfoOsss);
    }
}
